#pragma once
#include "ModelGraphHandle.h"
#include "afxwin.h"
#include "ColoredListCtrl.h"


// GroundLoopCheckDlg dialog


class GroundLoopCheckDlg : public CDialogEx
{
	DECLARE_DYNAMIC(GroundLoopCheckDlg)

public:
	GroundLoopCheckDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~GroundLoopCheckDlg();

// Dialog Data
	enum { IDD = IDD_GROUNDLOOP_CHECK };

	void ExecuteGroundLoopCheck();

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	DECLARE_MESSAGE_MAP()

	virtual BOOL OnInitDialog();
	afx_msg void OnNMDblclkResultList(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnClose();
	virtual void OnOK();
	virtual void OnCancel();
	afx_msg void OnDestroy();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnBnClickedOk();
	void DeleteAllItems();
private:
	CButton m_btClose;
	CColoredListCtrl m_resultReportListCtrl;
	CStatic m_staticResult;

	CModelLayerView *m_pModelLayerView;
	GroupLoopDataMap m_mapAllGroundLoop;
	
	struct ItemData
	{
		CDevice* pStDev;
		CDevice* pEndDev;
	};
};
